package TestWork;

public class Test02 {
    public static void main(String[] args) {
        Circle a=new Circle(4.0);
        Cylinder b=new Cylinder(5.0,5.0);
        a.getArea();
        a.getPerimeter();
        b.getVolume();
        b.showVolume();
    }
}
class Circle{
    private double radius;
    public double getArea(){
        double area=3.14*radius*radius;
        return area;
    }
    public double getPerimeter(){
        double perimeter = 2*3.14*radius;
        return perimeter;
    }

    public Circle() {
    }

    public Circle(double radius) {
        this.radius = radius;
    }
}
class Cylinder extends Circle{
    private double hight;
    public double getVolume(){
        double volume=getArea()*hight;
        return volume;
    }
    public void showVolume(){
        System.out.println(getVolume());
    }

    public Cylinder(double radius, double hight) {
        super(radius);
        this.hight = hight;
    }

}